package system

import (
	"gin-sns/app/ginframe/router"
	"gin-sns/app/service/middleware/auth"
)

//加载路由
func init() {
	// 角色路由
	g1 := router.New("admin", "/system/role", auth.Auth)
	g1.GET("/", "system:post:view", RoleController.List)
	g1.POST("/list", "system:post:list", RoleController.ListAjax)
	g1.GET("/add", "system:post:add", RoleController.Add)
	g1.POST("/add", "system:post:add", RoleController.AddSave)
	g1.POST("/remove", "system:post:remove", RoleController.Remove)
	g1.GET("/edit", "system:post:edit", RoleController.Edit)
	g1.POST("/edit", "system:post:edit", RoleController.EditSave)
	g1.POST("/export", "system:post:export", RoleController.Export)
	g1.POST("/checkRoleKeyUnique", "system:post:view", RoleController.CheckRoleKeyUnique)
	g1.POST("/checkRoleNameUniqueAll", "system:post:view", RoleController.CheckRoleNameUniqueAll)
	g1.POST("/checkRoleNameUnique", "system:post:view", RoleController.CheckRoleNameUnique)
	g1.POST("/checkRoleKeyUniqueAll", "system:post:view", RoleController.CheckRoleKeyUniqueAll)
	g1.GET("/authDataScope", "system:post:view", RoleController.AuthDataScope)
	g1.POST("/authDataScope", "system:post:view", RoleController.AuthDataScopeSave)
	g1.GET("/authUser", "system:post:view", RoleController.AuthUser)
	g1.POST("/allocatedList", "system:post:view", RoleController.AllocatedList)
	g1.GET("/selectUser", "system:post:view", RoleController.SelectUser)
	g1.POST("/unallocatedList", "system:post:view", RoleController.UnallocatedList)
	g1.POST("/selectAll", "system:post:view", RoleController.SelectAll)
	g1.POST("/cancel", "system:post:view", RoleController.Cancel)
	g1.POST("/cancelAll", "system:post:view", RoleController.CancelAll)
}
